<?php
define ('sys', realpath('system'));
$paths = array(sys.'/core/', sys.'/users/', sys.'/db/', sys.'/config/', sys.'/cart/', sys.'/display/', getcwd());

set_include_path(implode($paths, PATH_SEPARATOR));

include("config.php");

/**
 * For the extended menu
 */
require_once 'admin/db/database.class.php';
$db = new Db_Database;

require_once 'admin/display/display.class.php';
require_once 'admin/display/exmenu.class.php';
$menu = new Display_Exmenu;
/**
 * End!
 */

include("sessions.class.php");
include("userAccess.class.php");
include("dbconnect.class.php");
include("navdisplay.class.php");
$sess = new Session();
include("cart.class.php");
$CART = new Cart();
$nav = new Navdisplay();
$user = new userAccess();
$user->isLoggedIn(1);

include("genericdisplay.class.php");
$genDisplay = new Genericdisplay();
$headerImage = $genDisplay->displayHeaderImage();


include("frontpage.class.php");
$frontPromo = new frontPromo();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-16" />
		<meta name="description" content="" />
		<title>
			<?php echo SITENAME ?> Toolbox
		</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-16" />
<style type="text/css" media="screen">
/*<![CDATA[*/
 @import "styles/mainstyle.css"; 
/*]]>*/
</style>
<?php
        if (isset($_SESSION['lob'])){
        echo ("<link rel=\"stylesheet\" type=\"text/css\" href=\"styles/".$lob.".css\" />");
        }
?>



<link href="styles/dropdown/dropdown.css" media="all" rel="stylesheet" type="text/css" />
<link href="styles/dropdown/dropdown.vertical.css" media="all" rel="stylesheet" type="text/css" />
<link href="styles/dropdown/themes/default/default.css" media="all" rel="stylesheet" type="text/css" />

<!--[if lt IE 7]>
<script type="text/javascript" src="js/jquery/jquery.js"></script>
<script type="text/javascript" src="js/jquery/jquery.dropdown.js"></script>
<![endif]-->

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="styles/ie.css" />
<![endif]-->
</head>

	<body>
		<div id="wrapper">
			<div id="header">
				<div id="homelink">
					<a href="home.php">
						home
					</a>
					<a href="contact.php">
						contact
					</a>
					<a href="howtouse.php">
						how to use</a>
				</div>
				<div id="welcomeMessage">
					<p>
						Welcome <?php echo $_SESSION['realname']; ?> <a href="logout.php"> (logout)</a>
					</p>
				</div>
				<img src="images/<?php echo $headerImage;?>" alt="" width="1000"/>
			</div>
<?php
                    echo $CART->showMiniCart($_SESSION['username']);
                    ?>
			
				<?php
				
					//echo $nav->buildNavigation();
					$menu->buildMenu();
					
				?>
			
			<div id="content">
			<p>
				<?php
				
					$frontPromo->getFrontPromo();
				
				?>
			</p>
			</div>
			<div id="footer">
				<p>
					&copy; 
<?php echo (COPYRIGHT); ?>
					2009
				</p>
			</div>
		</div>
	</body>
</html>
